import React, {Component} from 'react'
import Base from "./Base"

export default class LM extends Component {
  constructor (props){
   super(props)
   this.state= {
     hover:0,
   }
}
tab(){
  return [
    {name:"任选二"},
    {name:"任选三"},
    {name:"任选四"},
    {name:"任选五"},
    // {name:"任二连组"},
    // {name:"选三前组"}
  ]
}
tabchoose=(index)=>{
   this.setState({
     hover:index
   })
   this.props.righttab("",index)
}
   render() {
     const {content} = this.props
     const {hover} =this.state
     var page =  content.length / 6    // 6个点击按钮
   return <div>
            <ul>
            {
              this.tab().map((item,i)=>{
                return <li key={i}  className={hover == i ? "hover" : ""}
                 onClick={()=>this.tabchoose(i)}>{item.name}</li>
              })
            }
            </ul>
            <div className="peilv">
              <div className="num">
                  <Base {...this.props} content={content.slice(page*hover,( hover+1)*page)}></Base>
              </div>
            </div>
   </div>
   }
}